package com.zhoukx.adapter.objectadpater;


/**
 *  对象适配器
 *  适配器类
 */
public class VoltageAdeapter  implements Volatge5V {

   private Voltage220V voltage220V;

    //
    @Override
    public int output5V() {
       // 先获取220的电压
        int srcV = voltage220V.output220V();
        int distV =  srcV/ 44;
        return distV;
    }

    public VoltageAdeapter(Voltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }
}
